import Vue from "vue"
import Router from "vue-router"
import Login from "./views/login.vue"
import Index from "./views/index.vue"
import About from "./views/about.vue"
import Register from "./views/register.vue"
import PasswordReset from "./views/password-reset.vue"
import ProductList from "./views/product/list.vue"
import ProductDetail from "./views/product/detail.vue"
import Result from './views/result.vue'
import Cart from './views/cart/index.vue'
import OrderConfirm from './views/order/order-confirm.vue'
import OrderList from './views/order/order-list.vue'
Vue.use(Router);

export default new Router({
    mode: "history",
    base: process.env.BASE_URL,
    routes: [{
        path: "*",
        redirect: "/index.html",
    }, {
        path: "/",
        redirect: "/index.html",
    }, {
        path: "/index",
        redirect: "/index.html",
    }, {
        path: "/index.html",
        component: Index,
    }, {
        path: "/register",
        component: Register,
    }, {
        path: "/login",
        redirect: "/login.html",
    }, {
        path: "/login.html",
        component: Login
    }, {
        path: "/password-reset",
        component: PasswordReset
    }, {
        path: "/about",
        component: About
    }, {
        path: "/list.html",
        component: ProductList
    }, {
        path: "/detail.html",
        component: ProductDetail
    }, {
        path: "/result.html",
        component: Result
    }, {
        path: "/cart",
        redirect: "/cart.html",
    }, {
        path: "/cart.html",
        component: Cart
    }, {
        path: "/order-confirm.html",
        component: OrderConfirm
    }, {
        path: "/order-list.html",
        component: OrderList
    }]
})
